#!/bin/bash

#	curl test script of UGNM service. 
#	
#	Tests resources /media and /media/<id> including all supported HTTP operations
#	and all possible responses. Unsupported operations are not explicitly tested.

echo -e "Resource /media"
echo -e "==============="

# get all media
echo -e "\nGET - get all media\n"

curl http://localhost:8080/ugnm-service/resources/media -v -X GET

# create new medium
echo -e "\nPOST - create new medium\n"
curl http://localhost:8080/ugnm-service/resources/media -v -X POST -H "Content-Type: application/json" -d "{'url':'http://lh4.ggpht.com/-HN3dcxbYYOw/SQ2fcphATDI/AAAAAAAAAj4/xwkVzczC5L4/L1000064.JPG','description':'Boring living room, but cool TV!'}"

